package dummy;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.time.DateUtils;

import com.vn.ld.btc.dao.entity.Order;

public class DummyChinh {

	public static void main(String args[]){
		int i = 1;
		System.out.println(~~~10);
		
		List<Order> c = new ArrayList<Order>();
		
		Date currDate = new Date();
		
		Order o = new Order();
		o.setOrderId("1");
		o.setUnitPrice(new BigDecimal(1));
		
		o.setCustomerOrderDate(currDate);
		
		
		Order o1 = new Order();
		o1.setOrderId("2");
		o1.setUnitPrice(new BigDecimal(2));
		o1.setCustomerOrderDate(DateUtils.addHours(currDate, 1));
		
		Order o2 = new Order();
		o2.setOrderId("3");
		o2.setUnitPrice(new BigDecimal(2));
		o2.setCustomerOrderDate(DateUtils.addHours(currDate, 1));
		//o2.setCustomerOrderDate(new Date());
		
		c.add(o);
		c.add(o1);
		c.add(o2);
		
		Collections.sort(c);
		
		for (Order order : c) {
			System.out.println(order.getOrderId());
		}
		
	}
	
	
}
